package com.sunny.entity;

import javax.persistence.*;

/**
 * @Author: sublun
 * @Date: 2021/3/19 15:18
 */
@Entity
@Table(name = "api_meta_name", schema = "crawler", catalog = "")
public class ApiMetaNameEntity {
    private long apiId;
    private String apiCode;
    private String apiName;
    private String apiCategory;
    private String apiDesc;
    private String apiComment;

    @Id
    @Column(name = "api_id")
    public long getApiId() {
        return apiId;
    }

    public void setApiId(long apiId) {
        this.apiId = apiId;
    }

    @Basic
    @Column(name = "api_code")
    public String getApiCode() {
        return apiCode;
    }

    public void setApiCode(String apiCode) {
        this.apiCode = apiCode;
    }

    @Basic
    @Column(name = "api_name")
    public String getApiName() {
        return apiName;
    }

    public void setApiName(String apiName) {
        this.apiName = apiName;
    }

    @Basic
    @Column(name = "api_category")
    public String getApiCategory() {
        return apiCategory;
    }

    public void setApiCategory(String apiCategory) {
        this.apiCategory = apiCategory;
    }

    @Basic
    @Column(name = "api_desc")
    public String getApiDesc() {
        return apiDesc;
    }

    public void setApiDesc(String apiDesc) {
        this.apiDesc = apiDesc;
    }

    @Basic
    @Column(name = "api_comment")
    public String getApiComment() {
        return apiComment;
    }

    public void setApiComment(String apiComment) {
        this.apiComment = apiComment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ApiMetaNameEntity that = (ApiMetaNameEntity) o;

        if (apiId != that.apiId) return false;
        if (apiCode != null ? !apiCode.equals(that.apiCode) : that.apiCode != null) return false;
        if (apiName != null ? !apiName.equals(that.apiName) : that.apiName != null) return false;
        if (apiCategory != null ? !apiCategory.equals(that.apiCategory) : that.apiCategory != null) return false;
        if (apiDesc != null ? !apiDesc.equals(that.apiDesc) : that.apiDesc != null) return false;
        if (apiComment != null ? !apiComment.equals(that.apiComment) : that.apiComment != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (apiId ^ (apiId >>> 32));
        result = 31 * result + (apiCode != null ? apiCode.hashCode() : 0);
        result = 31 * result + (apiName != null ? apiName.hashCode() : 0);
        result = 31 * result + (apiCategory != null ? apiCategory.hashCode() : 0);
        result = 31 * result + (apiDesc != null ? apiDesc.hashCode() : 0);
        result = 31 * result + (apiComment != null ? apiComment.hashCode() : 0);
        return result;
    }
}
